import { fetch } from './fetch'

/**
 * 今日课程
 * by Jehu
*/
// 获取 今日课程 数据
export const obtainDengesCourse = (open_id, batch_id, student_id, union_id) => fetch('POST', '/weapp/getCourse', {
  open_id,
  batch_id,
  student_id,
  union_id
})
/**
 * 意志计划
 * by Jehu
*/
// 获取 意志计划 数据
export const obtainVolitionProject = () => fetch('POST', '/weapp/getVolition', {})
/**
 * 我的
 * by Jehu
*/
// 获取 我的老师 数据
export const obtainPersonalTeacher = (batch_id) => fetch('POST', '/weapp/getTeacher', {
  batch_id
})
/**
 * 曲谱
 * by Jehu
*/
// 获取 曲谱库 数据
export const obtainMusicScore  = (page, open_id, union_id) => fetch('POST', '/weapp/getScore', {
  page,
  open_id,
  union_id
})
// 获取 我的曲谱 数据
export const obtainCollectScore  = (page, open_id, union_id) => fetch('POST', '/weapp/mineScore', {
  page,
  open_id,
  union_id
})
// 获取 曲谱详情 数据
export const obtainScoreDetails  = (score_id, open_id, union_id) => fetch('POST', '/weapp/gainScore', {
  score_id,
  open_id,
  union_id
})
// 搜索 曲谱 数据
export const searchMusicScore  = (text, page, open_id, union_id) => fetch('POST', '/weapp/searchScore', {
  text,
  page,
  open_id,
  union_id
})
// 添加 曲谱 到收藏库
export const appendScoreToCollect = (score_id, open_id, union_id) => fetch('POST', '/weapp/appendCollect', {
  score_id,
  open_id,
  union_id
})
// 移除 曲谱 于收藏库
export const removeScoreToCollect = (score_id, open_id, union_id) => fetch('POST', '/weapp/removalCollect', {
  score_id,
  open_id,
  union_id
})
// 累加 曲谱 浏览量
export const cumulativeHotOfScore = (score_id) => fetch('POST', '/weapp/addHot', {
  score_id
})

/** 
 *课程介绍
 * by 雄
*/
// 课程介绍
export const obtainCourseReferral = (open_id, union_id) => fetch('POST', '/weapp/getReferral', {
    open_id,
    union_id
})

// 获取 课程报名人数
export const obtainCourseApply = (batch_id, open_id, union_id) => fetch('POST', '/weapp/courseApply', {
  batch_id,
  open_id,
  union_id
})

// 获取学员意志力计划
export const obtainCourseWillPlan = (batch_id,union_id) => fetch('post', '/weapp/courseWillPlan', {
  batch_id,
  union_id
})
